<?php

if($act=='edit')
{
    $content    = ProductById($id);
    $idP        = $content['iParentId'];
}else
{
    $content['iStatus'] = 1;
}

$category   = LoadCategoryProductById($idP);      
$properties = getPropertyProduct($idP,$content['cProperty']);
$ir=0;
while(count($properties)==0)
{
	$idparent	= getIdParent($idP);
	if($idparent<=0)break;
	$properties=getPropertyProduct($idparent,$content['cProperty']);
	$ir++;
	if($ir>10)break;
}
$property   = BuildTableProduct($properties);
$filters    = ListPropertyFilter($idP);
?>